package com.zhao.practice;

import com.zhao.utils.ElasticsearchUtils;
import lombok.extern.slf4j.Slf4j;
import org.elasticsearch.action.delete.DeleteResponse;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.rest.RestStatus;

import java.net.UnknownHostException;

@Slf4j
public class DeleteText {
    public static void main(String[] args) throws UnknownHostException {
        TransportClient transportClient = ElasticsearchUtils.getTransportClient();
        DeleteResponse deleteResponse = transportClient.prepareDelete("ems", "emp", "jt8L6nwBpyyOYSG_SD7L").get();
        RestStatus status = deleteResponse.status();
        log.info("删除操作状态：", status.getStatus());
    }
}
